package cn.com.generaldata.os.service.indicator_evaluation.incr_analysis;

import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimerTask;

import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.xml.namespace.QName;



import cn.com.generaldata.os.service.indicator_evaluation.incr_analysis.GopCalculate;
import cn.com.generaldata.os.service.indicator_evaluation.incr_analysis.GopCalculateImplService;

public class ServiceState {
	
	 private static final QName SERVICE_NAME = new QName("org.cis.api.GopCalculate", "GopCalculateImplService");

	@SuppressWarnings("unused")
	public static String serviceState() {
	  StringBuffer sb = new StringBuffer();
	   try {
		   double[] ass={587.50,672.86,792.19,928.42,1018.61,1287.0,1873.50,2114.50,2717.40,3550.90,4253.10,4723.0,5288.04,5849.36,6407.95};
		   URL wsdlURL = GopCalculateImplService.WSDL_LOCATION;
		   GopCalculateImplService ss = new GopCalculateImplService(wsdlURL, SERVICE_NAME);
	       GopCalculate port = ss.getGopCalculateImplPort(); 
	       List<Double> list = new ArrayList<Double>();  
	        for (int i=0; i<ass.length; i++) { 
	        	if(ass[i]!=0.0){
	        		list.add(ass[i]);
	        	}
	        }
	       double _calculateGop__return = port.calculateGop(list);
	       System.out.println("calculateGop.result=" + _calculateGop__return);	 
		} catch (Exception e) {
			e.printStackTrace();
			 
		}
		   return sb.toString();
	}

	/**
	 * @param args
	 * 
	 * ����
	 * 
	 */
	public static void main(String[] args) {
		serviceState();
	}

	
}
